a=list(input().split())
slovarik=["zero","one","two","three","four","five","six","seven","eight","nine"]
for i in range(len(a)):
    if a[i] not in slovarik or len(a)!=3:
        print("wrong input")
        break
    else:
        for i in range(len(slovarik)):
            if slovarik[i]==a[0]:
                b=i*100
            if slovarik[i]==a[1]:
                c=i*10
            if slovarik[i]==a[2]:
                d=i
        e=b+c+d
print(e)
